package com.opages.mvc.example.api;

import com.opages.mvc.example.model.MvcExampleDto;
//import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.ResponseBody;

/**
 * @author daizhong.liu
 * @create 2020-07-09 19:42
 **/
@FeignClient(name="mvc-example")
@RequestMapping("/mvc/example")
public interface MvcExampleApi {
    @PostMapping("/get")
    @ResponseBody
    public MvcExampleDto getExample(@RequestParam("id") Integer id);

    @PostMapping(value="/save")
    public void save(MvcExampleDto exampleDto);
}
